/**
 * 
 */
package org.gov.vis.data.gui;

import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.util.ArrayList;
import java.util.List;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import org.gov.vis.components.VISComboBoxModel;
import org.gov.vis.components.VISTextField;
import org.gov.vis.data.dto.FollowUpDetailsDto;
import org.gov.vis.data.gui.listener.EditFollowUpDetailsListener;
import org.gov.vis.data.gui.listener.EditProgencyListener;
import org.gov.vis.gui.VisBaseDialog;
import org.gov.vis.gui.util.GuiUtil;
import org.gov.vis.util.DBConstants;
import org.gov.vis.util.Util;

import com.toedter.calendar.JDateChooser;

/**
 * @author user
 *
 */
public class EditProgencyDialog extends VisBaseDialog{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1000477856642122190L;
	private JPanel pnlFarmerDetails;
	private JPanel pnlCalfDetails;
	private JPanel pnlDM;
	private JLabel lblCalfDob;
	private JButton btnSave;
	private JPanel pnlBtns;
	private JPanel pnlMainFollowUPDet;
	private VISTextField txtBxSiresMilkYieldLtrs;
	private JLabel lblSiresMilkLtrs;
	private VISTextField txtBxBullNo;
	private JLabel lblBullNo;
	private VISTextField jTextField1;
	private JLabel jLabel1;
	private VISTextField txtBxPrvVactYldLtrs;
	private VISTextField txtBxNoCalving;
	private VISTextField txtBxPrsntMilkYldLtrs;
	private VISTextField txtNoOfAiDoneConc;
	private VISTextField txtBxBreed;
	private JLabel lblPrsntMlkYldLtrs;
	private JLabel lblPrevVacYldLtrs;
	private JLabel lblNoAIDoneConc;
	private JLabel lblNoOfCalving;
	private JLabel lblBreed;
	private VISTextField txtBxTagNo;
	private VISTextField txtBxColor;
	private VISTextField txtBxSex;
	private VISTextField txtBxPercentage;
	private VISTextField txtBxBreedType;
	private VISTextField txtBxCalfDob;
	private JLabel lblTagNo;
	private JLabel lblColor;
	private JLabel lblSex;
	private JLabel lblPercentage;
	private JLabel lblBreedType;
	private VISTextField txtBxDistrict;
	private JLabel lblDistrict;
	private VISTextField txtBxMandal;
	private JLabel lblMandal;
	private VISTextField txtBxVillage;
	private VISTextField txtBxRelationType;
	private JLabel lblVillage;
	private JLabel lblRelationtype;
	private VISTextField txtBxFarmerName;
	private JLabel lblFarmerName;
	private VISTextField txtBxFarmerCode;
	private JLabel lblFarmerCode;
	private VISTextField txtFldCode;
	private JLabel lblCode;
	private JPanel pnlCmnBtns;
	private JButton btnFollowUp;
	private JButton btnReset;
	private JPanel pnlSireDetails;
	private JScrollPane scrlPnFollowUpDetails;
	private JPanel pnlFollowUpDetails;
	private JDateChooser dtChoCalfDateOfBirth;
	private VISComboBoxModel visComBoxModel;
	private JComboBox combxSexType;
	private Object hidnObject;
	
	public static List<FollowUpDetailsDto> tempFollowUpLst;
	
	public List<FollowUpDetailsDto> followUpLst;
	
	private String searchText;
	public EditProgencyDialog(){
		
	}
	public EditProgencyDialog(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		tempFollowUpLst = new ArrayList<FollowUpDetailsDto>();
		// TODO Auto-generated constructor stub
		initGUI();
		GuiUtil.CompCenterCords cords=GuiUtil.getCompCenterCords(800, 700);
		setBounds(cords.getX(), cords.getY(), 800, 700);		
	}

	private void initGUI() {
		// TODO Auto-generated method stub
		GridBagLayout thisLayout = new GridBagLayout();
		thisLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.1};
		thisLayout.rowHeights = new int[] {20, 7, 20, 20, 20};
		thisLayout.columnWeights = new double[] {0.0, 0.1, 0.0};
		thisLayout.columnWidths = new int[] {7, 7, 7};
		getContentPane().setLayout(thisLayout);
		{
			pnlFarmerDetails = new JPanel();
			GridBagLayout pnlFarmerDetailsLayout = new GridBagLayout();
			pnlFarmerDetailsLayout.columnWidths = new int[] {7, 7, 7, 7, 7, 7, 7};
			pnlFarmerDetailsLayout.rowHeights = new int[] {20, 7, 7, 7, 7, 7, 7};
			pnlFarmerDetailsLayout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1};
			pnlFarmerDetailsLayout.rowWeights = new double[] {0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
			getContentPane().add(pnlFarmerDetails, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(2, 0, 0, 0), 0, 0));
			pnlFarmerDetails.setLayout(pnlFarmerDetailsLayout);
			pnlFarmerDetails.setBorder(BorderFactory.createTitledBorder("Farmer Details"));
			{
				lblFarmerCode = new JLabel();
				pnlFarmerDetails.add(lblFarmerCode, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblFarmerCode.setText("Farmer Code:");
			}
			{
				txtBxFarmerCode = new VISTextField();
				pnlFarmerDetails.add(txtBxFarmerCode, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblFarmerName = new JLabel();
				pnlFarmerDetails.add(lblFarmerName, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 70, 0, 0), 0, 0));
				lblFarmerName.setText("Farmer Name:");
			}
			{
				txtBxFarmerName = new VISTextField();
				pnlFarmerDetails.add(txtBxFarmerName, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblRelationtype = new JLabel();
				pnlFarmerDetails.add(lblRelationtype, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 80, 0, 0), 0, 0));
				lblRelationtype.setText("Relation Type:");
			}
			{
				lblVillage = new JLabel();
				pnlFarmerDetails.add(lblVillage, new GridBagConstraints(4, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblVillage.setText("Village:");
			}
			{
				txtBxRelationType = new VISTextField();
				pnlFarmerDetails.add(txtBxRelationType, new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtBxVillage = new VISTextField();
				pnlFarmerDetails.add(txtBxVillage, new GridBagConstraints(6, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblMandal = new JLabel();
				pnlFarmerDetails.add(lblMandal, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblMandal.setText("Mandal");
			}
			{
				txtBxMandal = new VISTextField();
				pnlFarmerDetails.add(txtBxMandal, new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblDistrict = new JLabel();
				pnlFarmerDetails.add(lblDistrict, new GridBagConstraints(4, 6, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblDistrict.setText("District:");
			}
			{
				txtBxDistrict = new VISTextField();
				pnlFarmerDetails.add(txtBxDistrict, new GridBagConstraints(6, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblCode = new JLabel();
				pnlFarmerDetails.add(lblCode, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblCode.setText("Code*:");
			}
			{
				txtFldCode = new VISTextField();
				pnlFarmerDetails.add(txtFldCode, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
		}
		{
			pnlCalfDetails = new JPanel();
			GridBagLayout pnlCalfDetailsLayout = new GridBagLayout();
			pnlCalfDetailsLayout.columnWidths = new int[] {7, 7, 7, 7, 7, 7, 7};
			pnlCalfDetailsLayout.rowHeights = new int[] {7, 7, 7, 7, 7};
			pnlCalfDetailsLayout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1};
			pnlCalfDetailsLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0};
			getContentPane().add(pnlCalfDetails, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			pnlCalfDetails.setLayout(pnlCalfDetailsLayout);
			pnlCalfDetails.setBorder(BorderFactory.createTitledBorder("Calf Details"));
			{
				lblCalfDob = new JLabel();
				pnlCalfDetails.add(lblCalfDob, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblCalfDob.setText("Calf DOB:");
			}
			{
				lblBreedType = new JLabel();
				pnlCalfDetails.add(lblBreedType, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 85, 0, 0), 0, 0));
				lblBreedType.setText("Breed Type:");
			}
			{
				lblPercentage = new JLabel();
				pnlCalfDetails.add(lblPercentage, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 90, 0, 0), 0, 0));
				lblPercentage.setText("Percentage:");
			}
			{
				lblSex = new JLabel();
				pnlCalfDetails.add(lblSex, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblSex.setText("Sex:");
			}
			{
				lblColor = new JLabel();
				pnlCalfDetails.add(lblColor, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblColor.setText("Color:");
			}
			{
				lblTagNo = new JLabel();
				pnlCalfDetails.add(lblTagNo, new GridBagConstraints(4, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblTagNo.setText("Tag No:");
			}
			
			{
				txtBxBreedType = new VISTextField();
				pnlCalfDetails.add(txtBxBreedType, new GridBagConstraints(6, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				//txtBxCalfDob = new VISTextField();
				//pnlCalfDetails.add(txtBxCalfDob, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				dtChoCalfDateOfBirth = new JDateChooser(null,DBConstants.DISPLAY_DATE_FORMAT);
				dtChoCalfDateOfBirth.setPreferredSize(txtBxBreedType.getPreferredSize());
				pnlCalfDetails.add(dtChoCalfDateOfBirth, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			
			}
			{
				txtBxPercentage = new VISTextField();
				pnlCalfDetails.add(txtBxPercentage, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				//txtBxSex = new VISTextField();
				//pnlCalfDetails.add(txtBxSex, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				visComBoxModel = new VISComboBoxModel();
				visComBoxModel.setData(Util.getSex());
				visComBoxModel.setSelectedKey(DBConstants.PROGENCY_SEX_MALE_KEY);
				combxSexType = new JComboBox();
				combxSexType.setPreferredSize(txtBxPercentage.getPreferredSize());
				pnlCalfDetails.add(combxSexType, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				combxSexType.setModel(visComBoxModel);
			}
			{
				txtBxColor = new VISTextField();
				pnlCalfDetails.add(txtBxColor, new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtBxTagNo = new VISTextField();
				pnlCalfDetails.add(txtBxTagNo, new GridBagConstraints(6, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
		}
		{
			pnlDM = new JPanel();
			GridBagLayout pnlDMLayout = new GridBagLayout();
			getContentPane().add(pnlDM, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			pnlDMLayout.columnWidths = new int[] {7, 7, 7, 7, 7, 7, 7};
			pnlDMLayout.rowHeights = new int[] {7, 7, 7, 7, 7};
			pnlDMLayout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1};
			pnlDMLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0};
			pnlDM.setLayout(pnlDMLayout);
			pnlDM.setBorder(BorderFactory.createTitledBorder("D&M Details"));
			{
				lblBreed = new JLabel();
				pnlDM.add(lblBreed, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblBreed.setText("Breed");
			}
			{
				lblNoOfCalving = new JLabel();
				pnlDM.add(lblNoOfCalving, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblNoOfCalving.setText("No of Calving");
			}
			{
				lblNoAIDoneConc = new JLabel();
				pnlDM.add(lblNoAIDoneConc, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblNoAIDoneConc.setText("No of AI Done for Conception");
			}
			{
				lblPrevVacYldLtrs = new JLabel();
				pnlDM.add(lblPrevVacYldLtrs, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblPrevVacYldLtrs.setText("Previous Vactation Yield(ltr):");
			}
			{
				lblPrsntMlkYldLtrs = new JLabel();
				pnlDM.add(lblPrsntMlkYldLtrs, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblPrsntMlkYldLtrs.setText("Present Milk Yield Per Day(ltr):");
			}
			{
				txtBxBreed = new VISTextField();
				pnlDM.add(txtBxBreed, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtNoOfAiDoneConc = new VISTextField();
				pnlDM.add(txtNoOfAiDoneConc, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtBxPrsntMilkYldLtrs = new VISTextField();
				pnlDM.add(txtBxPrsntMilkYldLtrs, new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtBxNoCalving = new VISTextField();
				pnlDM.add(txtBxNoCalving, new GridBagConstraints(6, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				txtBxPrvVactYldLtrs = new VISTextField();
				pnlDM.add(txtBxPrvVactYldLtrs, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
		}
		{
			pnlSireDetails = new JPanel();
			GridBagLayout pnlSireDetailsLayout = new GridBagLayout();
			pnlSireDetailsLayout.columnWidths = new int[] {7, 7, 7, 7, 7, 7, 7};
			pnlSireDetailsLayout.rowHeights = new int[] {7, 7, 7};
			pnlSireDetailsLayout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1};
			pnlSireDetailsLayout.rowWeights = new double[] {0.0, 0.0, 0.0};
			getContentPane().add(pnlSireDetails, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			pnlSireDetails.setLayout(pnlSireDetailsLayout);
			pnlSireDetails.setBorder(BorderFactory.createTitledBorder("Sire Details"));
			{
				jLabel1 = new JLabel();
				pnlSireDetails.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				jLabel1.setText("Breed:");
			}
			{
				jTextField1 = new VISTextField();
				pnlSireDetails.add(jTextField1, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblBullNo = new JLabel();
				pnlSireDetails.add(lblBullNo, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 100, 0, 0), 0, 0));
				lblBullNo.setText("Bull No");
			}
			{
				txtBxBullNo = new VISTextField();
				pnlSireDetails.add(txtBxBullNo, new GridBagConstraints(6, -1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblSiresMilkLtrs = new JLabel();
				pnlSireDetails.add(lblSiresMilkLtrs, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 25, 0, 0), 0, 0));
				lblSiresMilkLtrs.setText("Sire's D&M Milk Yield(ltr)");
			}
			{
				txtBxSiresMilkYieldLtrs = new VISTextField();
				pnlSireDetails.add(txtBxSiresMilkYieldLtrs, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				pnlBtns = new JPanel();
				pnlSireDetails.add(pnlBtns, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				{
					btnFollowUp = new JButton();
					pnlBtns.add(btnFollowUp);
					btnFollowUp.setText("Add new Follow Up Details");
					btnFollowUp.addActionListener(new EditFollowUpDetailsListener(this));
				}
			}
			{
				pnlCmnBtns = new JPanel();
				pnlSireDetails.add(pnlCmnBtns, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				{
					btnSave = new JButton();
					pnlCmnBtns.add(btnSave);
					btnSave.setText("Update");
					btnSave.addActionListener(new EditProgencyListener(this));
					
				}
				{
					btnReset = new JButton();
					pnlCmnBtns.add(btnReset);
					btnReset.setText("Delete");
					btnReset.addActionListener(new EditProgencyListener(this));
				}
			}
		}
		{
			/*followUpDetMainPanel = new JPanel();
			GridBagLayout followUpDetMainPanelLayout = new GridBagLayout();
			followUpDetMainPanelLayout.columnWidths = new int[] {7, 7, 7, 7};
			followUpDetMainPanelLayout.rowHeights = new int[] {7, 7, 7, 7};
			followUpDetMainPanelLayout.columnWeights = new double[] {0.1, 0.1, 0.1, 0.1};
			followUpDetMainPanelLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
			getContentPane().add(followUpDetMainPanel, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			followUpDetMainPanel.setLayout(followUpDetMainPanelLayout);
			followUpDetMainPanel.setBorder(BorderFactory.createTitledBorder("FollowUP Details"));*/
			
			{
				pnlMainFollowUPDet = new JPanel();
				GridBagLayout outerSrchPnlLayout = new GridBagLayout();
				getContentPane().add(pnlMainFollowUPDet, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
				outerSrchPnlLayout.rowWeights = new double[] {0.1, 0.0};
				outerSrchPnlLayout.rowHeights = new int[] {7, 7};
				outerSrchPnlLayout.columnWeights = new double[] {0.0, 0.1, 0.0};
				outerSrchPnlLayout.columnWidths = new int[] {7, 7, 7};
				pnlMainFollowUPDet.setLayout(outerSrchPnlLayout);
				pnlMainFollowUPDet.setBorder(BorderFactory.createTitledBorder("FollowUP Details"));
				{
					scrlPnFollowUpDetails = new JScrollPane();
					pnlMainFollowUPDet.add(scrlPnFollowUpDetails, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
					{
						pnlFollowUpDetails = new JPanel();
						scrlPnFollowUpDetails.setViewportView(pnlFollowUpDetails);
						//scrlPnGopMitSrcResults.setBorder(BorderFactory.createTitledBorder("Scroll Pane Results"));
						GridBagLayout pnlGopMitSrchResultsLayout = new GridBagLayout();
						pnlGopMitSrchResultsLayout.rowWeights = new double[] {0.0, 0.1};
						pnlGopMitSrchResultsLayout.rowHeights = new int[] {7, 20};
						pnlGopMitSrchResultsLayout.columnWeights = new double[] {0.1};
						pnlGopMitSrchResultsLayout.columnWidths = new int[] {7};
						pnlFollowUpDetails.setLayout(pnlGopMitSrchResultsLayout);
					}
				}
			}
		}
	}

	public void refreshScreen(List<FollowUpDetailsDto> followUpLst) {
		// TODO Auto-generated method stub
		EditFollowUpDetailsListener addProgencyListener = new EditFollowUpDetailsListener(this);
	  addProgencyListener.getFollowUpDetails(followUpLst);
	}

	/**
	 * @return the pnlFollowUpDetails
	 */
	public JPanel getPnlFollowUpDetails() {
		return pnlFollowUpDetails;
	}

	/**
	 * @param pnlFollowUpDetails the pnlFollowUpDetails to set
	 */
	public void setPnlFollowUpDetails(JPanel pnlFollowUpDetails) {
		this.pnlFollowUpDetails = pnlFollowUpDetails;
	}

	/**
	 * @return the txtBxFarmerCode
	 */
	public VISTextField getTxtBxFarmerCode() {
		return txtBxFarmerCode;
	}

	/**
	 * @return the pnlFarmerDetails
	 */
	public JPanel getPnlFarmerDetails() {
		return pnlFarmerDetails;
	}

	/**
	 * @param pnlFarmerDetails the pnlFarmerDetails to set
	 */
	public void setPnlFarmerDetails(JPanel pnlFarmerDetails) {
		this.pnlFarmerDetails = pnlFarmerDetails;
	}

	/**
	 * @return the pnlCalfDetails
	 */
	public JPanel getPnlCalfDetails() {
		return pnlCalfDetails;
	}

	/**
	 * @param pnlCalfDetails the pnlCalfDetails to set
	 */
	public void setPnlCalfDetails(JPanel pnlCalfDetails) {
		this.pnlCalfDetails = pnlCalfDetails;
	}

	/**
	 * @return the pnlDM
	 */
	public JPanel getPnlDM() {
		return pnlDM;
	}

	/**
	 * @param pnlDM the pnlDM to set
	 */
	public void setPnlDM(JPanel pnlDM) {
		this.pnlDM = pnlDM;
	}

	/**
	 * @return the lblCalfDob
	 */
	public JLabel getLblCalfDob() {
		return lblCalfDob;
	}

	/**
	 * @param lblCalfDob the lblCalfDob to set
	 */
	public void setLblCalfDob(JLabel lblCalfDob) {
		this.lblCalfDob = lblCalfDob;
	}

	/**
	 * @return the btnSave
	 */
	public JButton getBtnSave() {
		return btnSave;
	}

	/**
	 * @param btnSave the btnSave to set
	 */
	public void setBtnSave(JButton btnSave) {
		this.btnSave = btnSave;
	}

	/**
	 * @return the pnlBtns
	 */
	public JPanel getPnlBtns() {
		return pnlBtns;
	}

	/**
	 * @param pnlBtns the pnlBtns to set
	 */
	public void setPnlBtns(JPanel pnlBtns) {
		this.pnlBtns = pnlBtns;
	}

	/**
	 * @return the pnlMainFollowUPDet
	 */
	public JPanel getPnlMainFollowUPDet() {
		return pnlMainFollowUPDet;
	}

	/**
	 * @param pnlMainFollowUPDet the pnlMainFollowUPDet to set
	 */
	public void setPnlMainFollowUPDet(JPanel pnlMainFollowUPDet) {
		this.pnlMainFollowUPDet = pnlMainFollowUPDet;
	}

	/**
	 * @return the txtBxSiresMilkYieldLtrs
	 */
	public VISTextField getTxtBxSiresMilkYieldLtrs() {
		return txtBxSiresMilkYieldLtrs;
	}

	/**
	 * @param txtBxSiresMilkYieldLtrs the txtBxSiresMilkYieldLtrs to set
	 */
	public void setTxtBxSiresMilkYieldLtrs(VISTextField txtBxSiresMilkYieldLtrs) {
		this.txtBxSiresMilkYieldLtrs = txtBxSiresMilkYieldLtrs;
	}

	/**
	 * @return the lblSiresMilkLtrs
	 */
	public JLabel getLblSiresMilkLtrs() {
		return lblSiresMilkLtrs;
	}

	/**
	 * @param lblSiresMilkLtrs the lblSiresMilkLtrs to set
	 */
	public void setLblSiresMilkLtrs(JLabel lblSiresMilkLtrs) {
		this.lblSiresMilkLtrs = lblSiresMilkLtrs;
	}

	/**
	 * @return the txtBxBullNo
	 */
	public VISTextField getTxtBxBullNo() {
		return txtBxBullNo;
	}

	/**
	 * @param txtBxBullNo the txtBxBullNo to set
	 */
	public void setTxtBxBullNo(VISTextField txtBxBullNo) {
		this.txtBxBullNo = txtBxBullNo;
	}

	/**
	 * @return the lblBullNo
	 */
	public JLabel getLblBullNo() {
		return lblBullNo;
	}

	/**
	 * @param lblBullNo the lblBullNo to set
	 */
	public void setLblBullNo(JLabel lblBullNo) {
		this.lblBullNo = lblBullNo;
	}

	/**
	 * @return the jTextField1
	 */
	public VISTextField getJTextField1() {
		return jTextField1;
	}

	/**
	 * @param textField1 the jTextField1 to set
	 */
	public void setJTextField1(VISTextField textField1) {
		jTextField1 = textField1;
	}

	/**
	 * @return the jLabel1
	 */
	public JLabel getJLabel1() {
		return jLabel1;
	}

	/**
	 * @param label1 the jLabel1 to set
	 */
	public void setJLabel1(JLabel label1) {
		jLabel1 = label1;
	}

	/**
	 * @return the txtBxPrvVactYldLtrs
	 */
	public VISTextField getTxtBxPrvVactYldLtrs() {
		return txtBxPrvVactYldLtrs;
	}

	/**
	 * @param txtBxPrvVactYldLtrs the txtBxPrvVactYldLtrs to set
	 */
	public void setTxtBxPrvVactYldLtrs(VISTextField txtBxPrvVactYldLtrs) {
		this.txtBxPrvVactYldLtrs = txtBxPrvVactYldLtrs;
	}

	/**
	 * @return the txtBxNoCalving
	 */
	public VISTextField getTxtBxNoCalving() {
		return txtBxNoCalving;
	}

	/**
	 * @param txtBxNoCalving the txtBxNoCalving to set
	 */
	public void setTxtBxNoCalving(VISTextField txtBxNoCalving) {
		this.txtBxNoCalving = txtBxNoCalving;
	}

	/**
	 * @return the txtBxPrsntMilkYldLtrs
	 */
	public VISTextField getTxtBxPrsntMilkYldLtrs() {
		return txtBxPrsntMilkYldLtrs;
	}

	/**
	 * @param txtBxPrsntMilkYldLtrs the txtBxPrsntMilkYldLtrs to set
	 */
	public void setTxtBxPrsntMilkYldLtrs(VISTextField txtBxPrsntMilkYldLtrs) {
		this.txtBxPrsntMilkYldLtrs = txtBxPrsntMilkYldLtrs;
	}

	/**
	 * @return the txtNoOfAiDoneConc
	 */
	public VISTextField getTxtNoOfAiDoneConc() {
		return txtNoOfAiDoneConc;
	}

	/**
	 * @param txtNoOfAiDoneConc the txtNoOfAiDoneConc to set
	 */
	public void setTxtNoOfAiDoneConc(VISTextField txtNoOfAiDoneConc) {
		this.txtNoOfAiDoneConc = txtNoOfAiDoneConc;
	}

	/**
	 * @return the txtBxBreed
	 */
	public VISTextField getTxtBxBreed() {
		return txtBxBreed;
	}

	/**
	 * @param txtBxBreed the txtBxBreed to set
	 */
	public void setTxtBxBreed(VISTextField txtBxBreed) {
		this.txtBxBreed = txtBxBreed;
	}

	/**
	 * @return the lblPrsntMlkYldLtrs
	 */
	public JLabel getLblPrsntMlkYldLtrs() {
		return lblPrsntMlkYldLtrs;
	}

	/**
	 * @param lblPrsntMlkYldLtrs the lblPrsntMlkYldLtrs to set
	 */
	public void setLblPrsntMlkYldLtrs(JLabel lblPrsntMlkYldLtrs) {
		this.lblPrsntMlkYldLtrs = lblPrsntMlkYldLtrs;
	}

	/**
	 * @return the lblPrevVacYldLtrs
	 */
	public JLabel getLblPrevVacYldLtrs() {
		return lblPrevVacYldLtrs;
	}

	/**
	 * @param lblPrevVacYldLtrs the lblPrevVacYldLtrs to set
	 */
	public void setLblPrevVacYldLtrs(JLabel lblPrevVacYldLtrs) {
		this.lblPrevVacYldLtrs = lblPrevVacYldLtrs;
	}

	/**
	 * @return the lblNoAIDoneConc
	 */
	public JLabel getLblNoAIDoneConc() {
		return lblNoAIDoneConc;
	}

	/**
	 * @param lblNoAIDoneConc the lblNoAIDoneConc to set
	 */
	public void setLblNoAIDoneConc(JLabel lblNoAIDoneConc) {
		this.lblNoAIDoneConc = lblNoAIDoneConc;
	}

	/**
	 * @return the lblNoOfCalving
	 */
	public JLabel getLblNoOfCalving() {
		return lblNoOfCalving;
	}

	/**
	 * @param lblNoOfCalving the lblNoOfCalving to set
	 */
	public void setLblNoOfCalving(JLabel lblNoOfCalving) {
		this.lblNoOfCalving = lblNoOfCalving;
	}

	/**
	 * @return the lblBreed
	 */
	public JLabel getLblBreed() {
		return lblBreed;
	}

	/**
	 * @param lblBreed the lblBreed to set
	 */
	public void setLblBreed(JLabel lblBreed) {
		this.lblBreed = lblBreed;
	}

	/**
	 * @return the txtBxTagNo
	 */
	public VISTextField getTxtBxTagNo() {
		return txtBxTagNo;
	}

	/**
	 * @param txtBxTagNo the txtBxTagNo to set
	 */
	public void setTxtBxTagNo(VISTextField txtBxTagNo) {
		this.txtBxTagNo = txtBxTagNo;
	}

	/**
	 * @return the txtBxColor
	 */
	public VISTextField getTxtBxColor() {
		return txtBxColor;
	}

	/**
	 * @param txtBxColor the txtBxColor to set
	 */
	public void setTxtBxColor(VISTextField txtBxColor) {
		this.txtBxColor = txtBxColor;
	}

	/**
	 * @return the txtBxSex
	 */
	public VISTextField getTxtBxSex() {
		return txtBxSex;
	}

	/**
	 * @param txtBxSex the txtBxSex to set
	 */
	public void setTxtBxSex(VISTextField txtBxSex) {
		this.txtBxSex = txtBxSex;
	}

	/**
	 * @return the txtBxPercentage
	 */
	public VISTextField getTxtBxPercentage() {
		return txtBxPercentage;
	}

	/**
	 * @param txtBxPercentage the txtBxPercentage to set
	 */
	public void setTxtBxPercentage(VISTextField txtBxPercentage) {
		this.txtBxPercentage = txtBxPercentage;
	}

	/**
	 * @return the txtBxBreedType
	 */
	public VISTextField getTxtBxBreedType() {
		return txtBxBreedType;
	}

	/**
	 * @param txtBxBreedType the txtBxBreedType to set
	 */
	public void setTxtBxBreedType(VISTextField txtBxBreedType) {
		this.txtBxBreedType = txtBxBreedType;
	}

	/**
	 * @return the txtBxCalfDob
	 */
	public VISTextField getTxtBxCalfDob() {
		return txtBxCalfDob;
	}

	/**
	 * @param txtBxCalfDob the txtBxCalfDob to set
	 */
	public void setTxtBxCalfDob(VISTextField txtBxCalfDob) {
		this.txtBxCalfDob = txtBxCalfDob;
	}

	/**
	 * @return the lblTagNo
	 */
	public JLabel getLblTagNo() {
		return lblTagNo;
	}

	/**
	 * @param lblTagNo the lblTagNo to set
	 */
	public void setLblTagNo(JLabel lblTagNo) {
		this.lblTagNo = lblTagNo;
	}

	/**
	 * @return the lblColor
	 */
	public JLabel getLblColor() {
		return lblColor;
	}

	/**
	 * @param lblColor the lblColor to set
	 */
	public void setLblColor(JLabel lblColor) {
		this.lblColor = lblColor;
	}

	/**
	 * @return the lblSex
	 */
	public JLabel getLblSex() {
		return lblSex;
	}

	/**
	 * @param lblSex the lblSex to set
	 */
	public void setLblSex(JLabel lblSex) {
		this.lblSex = lblSex;
	}

	/**
	 * @return the lblPercentage
	 */
	public JLabel getLblPercentage() {
		return lblPercentage;
	}

	/**
	 * @param lblPercentage the lblPercentage to set
	 */
	public void setLblPercentage(JLabel lblPercentage) {
		this.lblPercentage = lblPercentage;
	}

	/**
	 * @return the lblBreedType
	 */
	public JLabel getLblBreedType() {
		return lblBreedType;
	}

	/**
	 * @param lblBreedType the lblBreedType to set
	 */
	public void setLblBreedType(JLabel lblBreedType) {
		this.lblBreedType = lblBreedType;
	}

	/**
	 * @return the txtBxDistrict
	 */
	public VISTextField getTxtBxDistrict() {
		return txtBxDistrict;
	}

	/**
	 * @param txtBxDistrict the txtBxDistrict to set
	 */
	public void setTxtBxDistrict(VISTextField txtBxDistrict) {
		this.txtBxDistrict = txtBxDistrict;
	}

	/**
	 * @return the lblDistrict
	 */
	public JLabel getLblDistrict() {
		return lblDistrict;
	}

	/**
	 * @param lblDistrict the lblDistrict to set
	 */
	public void setLblDistrict(JLabel lblDistrict) {
		this.lblDistrict = lblDistrict;
	}

	/**
	 * @return the txtBxMandal
	 */
	public VISTextField getTxtBxMandal() {
		return txtBxMandal;
	}

	/**
	 * @param txtBxMandal the txtBxMandal to set
	 */
	public void setTxtBxMandal(VISTextField txtBxMandal) {
		this.txtBxMandal = txtBxMandal;
	}

	/**
	 * @return the lblMandal
	 */
	public JLabel getLblMandal() {
		return lblMandal;
	}

	/**
	 * @param lblMandal the lblMandal to set
	 */
	public void setLblMandal(JLabel lblMandal) {
		this.lblMandal = lblMandal;
	}

	/**
	 * @return the txtBxVillage
	 */
	public VISTextField getTxtBxVillage() {
		return txtBxVillage;
	}

	/**
	 * @param txtBxVillage the txtBxVillage to set
	 */
	public void setTxtBxVillage(VISTextField txtBxVillage) {
		this.txtBxVillage = txtBxVillage;
	}

	/**
	 * @return the txtBxRelationType
	 */
	public VISTextField getTxtBxRelationType() {
		return txtBxRelationType;
	}

	/**
	 * @param txtBxRelationType the txtBxRelationType to set
	 */
	public void setTxtBxRelationType(VISTextField txtBxRelationType) {
		this.txtBxRelationType = txtBxRelationType;
	}

	/**
	 * @return the lblVillage
	 */
	public JLabel getLblVillage() {
		return lblVillage;
	}

	/**
	 * @param lblVillage the lblVillage to set
	 */
	public void setLblVillage(JLabel lblVillage) {
		this.lblVillage = lblVillage;
	}

	/**
	 * @return the lblRelationtype
	 */
	public JLabel getLblRelationtype() {
		return lblRelationtype;
	}

	/**
	 * @param lblRelationtype the lblRelationtype to set
	 */
	public void setLblRelationtype(JLabel lblRelationtype) {
		this.lblRelationtype = lblRelationtype;
	}

	/**
	 * @return the txtBxFarmerName
	 */
	public VISTextField getTxtBxFarmerName() {
		return txtBxFarmerName;
	}

	/**
	 * @param txtBxFarmerName the txtBxFarmerName to set
	 */
	public void setTxtBxFarmerName(VISTextField txtBxFarmerName) {
		this.txtBxFarmerName = txtBxFarmerName;
	}

	/**
	 * @return the lblFarmerName
	 */
	public JLabel getLblFarmerName() {
		return lblFarmerName;
	}

	/**
	 * @param lblFarmerName the lblFarmerName to set
	 */
	public void setLblFarmerName(JLabel lblFarmerName) {
		this.lblFarmerName = lblFarmerName;
	}

	/**
	 * @return the lblFarmerCode
	 */
	public JLabel getLblFarmerCode() {
		return lblFarmerCode;
	}

	/**
	 * @param lblFarmerCode the lblFarmerCode to set
	 */
	public void setLblFarmerCode(JLabel lblFarmerCode) {
		this.lblFarmerCode = lblFarmerCode;
	}

	/**
	 * @return the txtFldCode
	 */
	public VISTextField getTxtFldCode() {
		return txtFldCode;
	}

	/**
	 * @param txtFldCode the txtFldCode to set
	 */
	public void setTxtFldCode(VISTextField txtFldCode) {
		this.txtFldCode = txtFldCode;
	}

	/**
	 * @return the lblCode
	 */
	public JLabel getLblCode() {
		return lblCode;
	}

	/**
	 * @param lblCode the lblCode to set
	 */
	public void setLblCode(JLabel lblCode) {
		this.lblCode = lblCode;
	}

	/**
	 * @return the pnlCmnBtns
	 */
	public JPanel getPnlCmnBtns() {
		return pnlCmnBtns;
	}

	/**
	 * @param pnlCmnBtns the pnlCmnBtns to set
	 */
	public void setPnlCmnBtns(JPanel pnlCmnBtns) {
		this.pnlCmnBtns = pnlCmnBtns;
	}

	/**
	 * @return the btnFollowUp
	 */
	public JButton getBtnFollowUp() {
		return btnFollowUp;
	}

	/**
	 * @param btnFollowUp the btnFollowUp to set
	 */
	public void setBtnFollowUp(JButton btnFollowUp) {
		this.btnFollowUp = btnFollowUp;
	}

	/**
	 * @return the btnReset
	 */
	public JButton getBtnReset() {
		return btnReset;
	}

	/**
	 * @param btnReset the btnReset to set
	 */
	public void setBtnReset(JButton btnReset) {
		this.btnReset = btnReset;
	}

	/**
	 * @return the pnlSireDetails
	 */
	public JPanel getPnlSireDetails() {
		return pnlSireDetails;
	}

	/**
	 * @param pnlSireDetails the pnlSireDetails to set
	 */
	public void setPnlSireDetails(JPanel pnlSireDetails) {
		this.pnlSireDetails = pnlSireDetails;
	}

	/**
	 * @return the scrlPnFollowUpDetails
	 */
	public JScrollPane getScrlPnFollowUpDetails() {
		return scrlPnFollowUpDetails;
	}

	/**
	 * @param scrlPnFollowUpDetails the scrlPnFollowUpDetails to set
	 */
	public void setScrlPnFollowUpDetails(JScrollPane scrlPnFollowUpDetails) {
		this.scrlPnFollowUpDetails = scrlPnFollowUpDetails;
	}

	/**
	 * @param txtBxFarmerCode the txtBxFarmerCode to set
	 */
	public void setTxtBxFarmerCode(VISTextField txtBxFarmerCode) {
		this.txtBxFarmerCode = txtBxFarmerCode;
	}

	/**
	 * @return the dtChoCalfDateOfBirth
	 */
	public JDateChooser getDtChoCalfDateOfBirth() {
		return dtChoCalfDateOfBirth;
	}

	/**
	 * @param dtChoCalfDateOfBirth the dtChoCalfDateOfBirth to set
	 */
	public void setDtChoCalfDateOfBirth(JDateChooser dtChoCalfDateOfBirth) {
		this.dtChoCalfDateOfBirth = dtChoCalfDateOfBirth;
	}

	/**
	 * @return the visComBoxModel
	 */
	public VISComboBoxModel getVisComBoxModel() {
		return visComBoxModel;
	}

	/**
	 * @param visComBoxModel the visComBoxModel to set
	 */
	public void setVisComBoxModel(VISComboBoxModel visComBoxModel) {
		this.visComBoxModel = visComBoxModel;
	}

	/**
	 * @return the combxSexType
	 */
	public JComboBox getCombxSexType() {
		return combxSexType;
	}

	/**
	 * @param combxSexType the combxSexType to set
	 */
	public void setCombxSexType(JComboBox combxSexType) {
		this.combxSexType = combxSexType;
	}

	/**
	 * @return the hidnObject
	 */
	public Object getHidnObject() {
		return hidnObject;
	}

	/**
	 * @param hidnObject the hidnObject to set
	 */
	public void setHidnObject(Object hidnObject) {
		this.hidnObject = hidnObject;
	}

	/**
	 * @return the followUpLst
	 */
	public List<FollowUpDetailsDto> getFollowUpLst() {
		return followUpLst;
	}

	/**
	 * @param followUpLst the followUpLst to set
	 */
	public void setFollowUpLst(List<FollowUpDetailsDto> followUpLst) {
		this.followUpLst = followUpLst;
	}
/**
	 * @return the searchText
	 */
	public String getSearchText() {
		return searchText;
	}

	/**
	 * @param searchText the searchText to set
	 */
	public void setSearchText(String searchText) {
		this.searchText = searchText;
	}


}//end class
